<template>

父组件
<Child ref="childRef" @parent-event="parentEvent" @parent2-event="parentEvent2"></Child>
<el-button @click="callChild">点击调用子组件方法</el-button>

</template>

<script setup lang="ts">
import Child from '@/components/Child.vue';

const childRef = ref();
const callChild = () => {
   childRef.value.sonDo()
}


const parentEvent = (payload: any) => {
   console.log('父组件监听子组件事件',payload);
}


const parentEvent2 = (payload: any) => {
   console.log('伶人自伶',payload);
}
</script>

<style>

</style>